package com.ecut.property_project.model;

import java.util.concurrent.ThreadLocalRandom;

public class Sms {

    String phoneNumber;
    String code;
    String min = "2";

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMin() {
        return min;
    }

    public void setMin(String min) {
        this.min = min;
    }

    public static String getSmsCode() {
        String code = String.valueOf(ThreadLocalRandom.current().nextInt(100000, 1000000));
        return code;
    }

    @Override
    public String toString() {
        return "Sms{" +
                "phoneNumber='" + phoneNumber + '\'' +
                ", code='" + code + '\'' +
                ", min=" + min +
                '}';
    }

}
